@vars = ('$h123','@array','%hash_234','misc');
foreach (@vars){
    if(/^\$[a-zA-Z]+[_0-9a-zA-Z]*$/){
        print "$_ is a scalar value\n";}
    elsif(/^@[a-zA-Z]+[_0-9a-zA-Z]*$/){
        print "$_ is an array\n";}
    elsif(/^%[a-zA-Z]+[_0-9a-zA-Z]*$/){
        print "$_ is an hash\n";}
    else{print "can not recognize $_ as an variable\n";}
}
